/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package seso;

import java.awt.Graphics;
import java.awt.Image;

/**
 *
 * @author Administrator
 */
public class RDialogShortcutSeparator extends javax.swing.JLabel {
    private Image dlgShortcutSeparatorTopImage = Util.getUserImage("resources/DlgShortcutSeparatorTop.png");
    private Image dlgShortcutSeparatorMiddleImage = Util.getUserImage("resources/DlgShortcutSeparatorMiddle.png");
    private Image dlgShortcutSeparatorBottomImage = Util.getUserImage("resources/DlgShortcutSeparatorBottom.png");
    
    private int topWidth = dlgShortcutSeparatorTopImage.getWidth(null);
    private int topHeight = dlgShortcutSeparatorTopImage.getHeight(null);
    private int bottomHeight = dlgShortcutSeparatorBottomImage.getHeight(null);
    
    public RDialogShortcutSeparator() {
        super();
        setSize(topWidth, 200);
        setPreferredSize(new java.awt.Dimension(topWidth, 200));
        setCursor(new java.awt.Cursor(java.awt.Cursor.E_RESIZE_CURSOR));
    }
    

    @Override
    protected void paintComponent(Graphics g) {
        int width = getWidth();
        int height = getHeight();
        
        setText("");
        g.drawImage(dlgShortcutSeparatorTopImage, 0, 0, width, topHeight, null);
        g.drawImage(dlgShortcutSeparatorMiddleImage, 0, topHeight, width, height - topHeight - bottomHeight, null);
        g.drawImage(dlgShortcutSeparatorBottomImage, 0, height - bottomHeight - 1, width, bottomHeight, null);
        
        super.paintComponent(g);
    }
    
}
